<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>订单列表 - Powered By ${systemConfig.systemName}</title>
<meta name="Author" content="webmall Team" />
<meta name="Copyright" content="webmall" />
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<#include "/WEB-INF/template/common/include.ftl">
<link href="${base}/template/shop/css/login.css" rel="stylesheet" type="text/css" />
<link href="${base}/template/shop/css/register.css" rel="stylesheet" type="text/css" />
<link href="${base}/template/shop/css/member_center.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${base}/template/shop/js/login.js"></script>
<script type="text/javascript" src="${base}/template/shop/js/register.js"></script>
<style>
    .h30{
   	line-height:30px;
    margin:8px;
    }
    </style>
</head>
<body class="memberCenter">
	<#include "/WEB-INF/template/shop/header.ftl">
	<div class="body orderList">
		<div class="bodyLeft">
			<#include "/WEB-INF/template/member/trader_center_left.ftl">
		</div>
		<div class="bodyRight">
			<form id="listForm" action="order!list.action" method="post">
                <input type="hidden" name="pager.pageSize" value="10" />
			<div class="memberCenterDetail">
				<div class="top">订单列表</div>
              	<div class="operateBar">
                    <div class="left h30" >
						<label>订单编号:</label>
						<input type="text" name="pager.whereClause['orderSn']" value="${(pager.whereClause['orderSn'][0])!}">
	                    <label>买家昵称:</label>
						<input type="text" name="pager.whereClause['member.username']" value="${(pager.whereClause['member.username'][0])!}">
	                    <br/>
                        <label>成交时间:</label>
						<input type="text" name="beginDate" value="${(beginDate)!}" onfocus="WdatePicker({minDate:'%y-%M-{%d+0}'})"/>~<input type="text" name="endDate" value="${(endDate)!}" onfocus="WdatePicker({minDate:'%y-%M-{%d+0}'})"/>
	                    <br/>
	                    <label>订单状态:</label>
                        
		                <select name="orderStatus">
							<option value="" selected="selected">
								-------
							</option>
							<option value="unprocessed" <#if orderStatus == 'unprocessed'>selected="selected" </#if>>
								未处理
							</option>
		                    <option value="processed" <#if orderStatus == 'processed'>selected="selected" </#if>>
								已处理
							</option>
		                    <option value="completed" <#if orderStatus == 'completed'>selected="selected" </#if>>
								已完成
							</option>
		                    <option value="commented" <#if orderStatus == 'commented'>selected="selected" </#if>>
								已评论
							</option>
		                    <option value="closed" <#if orderStatus == 'closed'>selected="selected" </#if>>
								关闭
							</option>
		                    <option value="invalid" <#if orderStatus == 'invalid'>selected="selected" </#if>>
								已作废
							</option>
						</select>
	                     <label>支付状态:</label>
		                <select name="paymentStatus">
							<option value="" selected="selected">
								-------
							</option>
							<option value="unpaid" <#if paymentStatus == 'unpaid'>selected="selected" </#if>>
								未支付
							</option>
		                    <option value="paid" <#if paymentStatus == 'paid'>selected="selected" </#if>>
								已付
							</option>
						</select>
                     </div>
                    <div class="right">
                         <br/>
	                    <input type="submit" id="searchButton" class="searchButton" value="" />
                    </div>
				</div>
				<div class="middle">
					<div class="blank"></div>
					<table class="listTable">
						<tr>
							<th style="width: 300px;">订单商品</th>
							<th>订单编号</th>
							<th>下单时间</th>
							<th>订单金额</th>
							<th>订单状态</th>
							<th>处理</th>
						</tr>
						<#list pager.list as list>
							<tr>
								<td>
									<a href="order!view.action?id=${list.id}">
										<span title="<#list list.productItemSet as list><#if list_index != 0>、</#if>${list.name}</#list>">
											<#list list.orderItemSet as list>
						                		<#if (list_index==4)>
													<#break />
												</#if>
                                                <img src="${base}${(list.productitem.product.productImageList[0].thumbnailProductImagePath)!systemConfig.defaultThumbnailProductImagePath}" style="width:60px;height:60px;" />
											</#list>
										</span>
									</a>
								</td>
								<td>
									<a href="order!view.action?id=${list.id}">${list.orderSn}</a>
								</td>
								<td>
									<span title="${list.createDate?string("yyyy-MM-dd HH:mm:ss")}">${list.createDate}</span>
								</td>
								<td>
									${list.totalAmount?string(orderUnitCurrencyFormat)}
								</td>
								<td>
									<#if list.orderStatus != "processed" && list.orderStatus != "unprocessed">
										<p>[${action.getText("OrderStatus." + list.orderStatus)}]</p>
									</#if>
									<p>[${action.getText("PaymentStatus." + list.paymentStatus)}]</p>
									<p>[${action.getText("ShippingStatus." + list.shippingStatus)}]</p>
								</td>
								<td>
									<a href="order!process.action?order.id=${list.id}" title="处理">[处理]</a>
								</td>
							</tr>
						</#list>
					</table>
					<div class="blank"></div>
         			<link href="${base}/template/shop/css/pager.css" rel="stylesheet" type="text/css" />
         			<#import "/WEB-INF/template/shop/pager.ftl" as p>
         			<@p.pager pager = pager baseUrl = "/member/order!list.action" />
				</div>
				<div class="bottom"></div>
			</div>
            </form>
		</div>
		<div class="blank"></div>
		<#include "/WEB-INF/template/shop/friend_link.ftl">
	</div>
	<div class="blank"></div>
	<#include "/WEB-INF/template/shop/footer.ftl">
</body>
</html>